
def triangles():
	a=[1]
	while True:
		yield a
		a.append(0)
		a=[a[i-1]+a[i] for i in range(len(a))]
		#用上列表生成器！！牛批
		#for i in range(xx) 中的i 代表的是元素而非下标！！！



n=0
for t in triangles():
    print(t)
    n = n + 1
    if n == 5:
        break